﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Data.Linq.Mapping;
using System.ComponentModel;

namespace NutriLeaf.Phone.Model
{
    [Table]
    public class UserProfile : INotifyPropertyChanged,INotifyPropertyChanging
    {
        private int userProfileId, age, weightCategoryId,activityLevelID,healthRatingID,totalCalorieNeededPerDay,locationID;
        private string name, firstName, lastName;
        private DateTime birthday,dateTimeAdded,dateTimeUpdated;
        private bool gender, userBlocked;
        private float currentWeight,timeZone,height,totalCalorieLostGainPerday,totalCalorieLostGainPermonth,bmi,bmr,targetWeight;


        [Column(IsPrimaryKey = true)]
        public int UserProfileID
        {
            get
            {
                return userProfileId;
            }
            set
            {
                NotifyPropertyChanging("UserProfileID");
                userProfileId = value;
                NotifyPropertyChanged("UserProfileID");
            }

        }

        [Column]
        public string Name
        {
            get
            {
                return name;
            }
            set
            {
                NotifyPropertyChanging("Name");
                name = value;
                NotifyPropertyChanged("Name");
            }

        }

        [Column]
        public string FirstName
        {
            get
            {
                return firstName;
            }
            set
            {
                NotifyPropertyChanging("FirstName");
                firstName = value;
                NotifyPropertyChanged("FirstName");
            }

        }

        [Column]
        public string LastName
        {
            get
            {
                return lastName;
            }
            set
            {
                NotifyPropertyChanging("LastName");
                lastName = value;
                NotifyPropertyChanged("LastName");
            }

        }

        [Column]
        public int Age
        {
            get
            {
                return age;
            }
            set
            {
                NotifyPropertyChanging("Age");
                age = value;
                NotifyPropertyChanged("Age");
            }

        }

        [Column]
        public int WeightCategoryID
        {
            get
            {
                return weightCategoryId;
            }
            set
            {
                NotifyPropertyChanging("WeightCategoryID");
                weightCategoryId = value;
                NotifyPropertyChanged("WeightCategoryID");
            }

        }

        [Column]
        public int ActivityLevelID
        {
            get
            {
                return activityLevelID;
            }
            set
            {
                NotifyPropertyChanging("ActivityLevelID");
                activityLevelID = value;
                NotifyPropertyChanged("ActivityLevelID");
            }

        }

        [Column]
        public int HealthRatingID
        {
            get
            {
                return healthRatingID;
            }
            set
            {
                NotifyPropertyChanging("HealthRatingID");
                healthRatingID = value;
                NotifyPropertyChanged("HealthRatingID");
            }

        }

        [Column]
        public int TotalCalorieNeededPerDay
        {
            get
            {
                return totalCalorieNeededPerDay;
            }
            set
            {
                NotifyPropertyChanging("TotalCalorieNeededPerDay");
                totalCalorieNeededPerDay = value;
                NotifyPropertyChanged("TotalCalorieNeededPerDay");
            }

        }

        [Column]
        public int LocationID
        {
            get
            {
                return locationID;
            }
            set
            {
                NotifyPropertyChanging("LocationID");
                locationID = value;
                NotifyPropertyChanged("LocationID");
            }

        }

        [Column]
        public DateTime Birthday
        {
            get
            {
                return birthday;
            }
            set
            {
                NotifyPropertyChanging("Birthday");
                birthday = value;
                NotifyPropertyChanged("Birthday");
            }

        }

        [Column]
        public DateTime DateTimeAdded
        {
            get
            {
                return dateTimeAdded;
            }
            set
            {
                NotifyPropertyChanging("DateTimeAdded");
                dateTimeAdded = value;
                NotifyPropertyChanged("DateTimeAdded");
            }

        }

        [Column]
        public DateTime DateTimeUpdated
        {
            get
            {
                return dateTimeUpdated;
            }
            set
            {
                NotifyPropertyChanging("DateTimeUpdated");
                dateTimeUpdated = value;
                NotifyPropertyChanged("DateTimeUpdated");
            }

        }

        [Column]
        public bool Gender
        {
            get
            {
                return gender;
            }
            set
            {
                NotifyPropertyChanging("Gender");
                gender = value;
                NotifyPropertyChanged("Gender");
            }

        }

        [Column]
        public bool UserBlocked
        {
            get
            {
                return userBlocked;
            }
            set
            {
                NotifyPropertyChanging("UserBlocked");
                UserBlocked = value;
                NotifyPropertyChanged("UserBlocked");
            }

        }

        [Column]
        public float CurrentWeight
        {
            get
            {
                return currentWeight;
            }
            set
            {
                NotifyPropertyChanging("CurrentWeight");
                currentWeight = value;
                NotifyPropertyChanged("CurrentWeight");
            }

        }


        [Column]
        public float Timezone
        {
            get
            {
                return timeZone;
            }
            set
            {
                NotifyPropertyChanging("Timezone");
                timeZone = value;
                NotifyPropertyChanged("Timezone");
            }

        }

        [Column]
        public float Height
        {
            get
            {
                return height;
            }
            set
            {
                NotifyPropertyChanging("Height");
                height = value;
                NotifyPropertyChanged("Height");
            }

        }


        [Column]
        public float BMI
        {
            get
            {
                return bmi;
            }
            set
            {
                NotifyPropertyChanging("BMI");
                bmi = value;
                NotifyPropertyChanged("BMI");
            }

        }

        [Column]
        public float BMR
        {
            get
            {
                return bmr;
            }
            set
            {
                NotifyPropertyChanging("BMR");
                bmr = value;
                NotifyPropertyChanged("BMR");
            }

        }

        [Column]
        public float TargetWeight
        {
            get
            {
                return targetWeight;
            }
            set
            {
                NotifyPropertyChanging("TargetWeight");
                targetWeight = value;
                NotifyPropertyChanged("TargetWeight");
            }

        }

        [Column]
        public float TotalCalorieLostGainPerDay
        {
            get
            {
                return totalCalorieLostGainPerday;
            }
            set
            {
                NotifyPropertyChanging("TotalCalorieLostGainPerDay");
                totalCalorieLostGainPerday = value;
                NotifyPropertyChanged("TotalCalorieLostGainPerDay");
            }

        }

        [Column]
        public float TotalCalorieLostGainPerMonth
        {
            get
            {
                return totalCalorieLostGainPermonth;
            }
            set
            {
                NotifyPropertyChanging("TotalCalorieLostGainPerMonth");
                totalCalorieLostGainPermonth = value;
                NotifyPropertyChanged("TotalCalorieLostGainPerMonth");
            }

        }





        public event PropertyChangedEventHandler PropertyChanged;

        public event PropertyChangingEventHandler PropertyChanging;

        private void NotifyPropertyChanged(string propertyName) { if (PropertyChanged != null) { PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } }
        private void NotifyPropertyChanging(string propertyName) { if (PropertyChanging != null) { PropertyChanging(this, new PropertyChangingEventArgs(propertyName)); } }
    }
}
